'use strict';

module.exports = appInfo => {
  const config = (exports = {});

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1549368712748_6795';

  // add your config here
  config.middleware = [];
  // config.errorHandler = {
  //   match: '/api',
  // };
  config.security = { csrf: { enable: false } };
  config.sequelize = {
    dialect: 'mysql',
    host: '127.0.0.1',
    port: 3306,
    password: 'mima10086',
    database: 'learn',
  };
  config.middleware = [ 'authorization' ];

  config.authWhiteList = [
    '/',
    '/api/v2',
    '/api/v2/login',
    'api/v2/login/register',
  ];
  config.password_secret = 'lyman345von';
  config.jwtSecret = 'fw6xixi';
  config.auth_cookie_name = 'token';

  return config;
};
